package com.sdk.config;

import com.sdk.utill.VersionGenerator;
import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class DYConfig {
   public static String appId;
   public static String secret;
   public static String version;
   public static List<String> pushTypeList = new ArrayList<>(List.of("live_comment", "live_gift", "live_like"));
   @Value("${game.params.douyin.app-id}")
   public String getAppId;
   @Value("${game.params.douyin.secret}")
   public String getSecret;

   @PostConstruct
   public void init() {
      appId = this.getAppId;
      secret = this.getSecret;
      version = VersionGenerator.getCurrentWeekVersion();
   }
}
